package com.soulless.innerclass.demo3;

/**
 * <p>
 *
 * </p>
 *
 * @author zenglei
 * @date 2023/05/19/ 16:09
 */
public class Payer {

    private double money = 100;

    private class PayImpl implements IPay {
        @Override
        public void pay() {
            System.out.println("钱包剩余：" + money);
            money--;
            System.out.println("paying ...");
            System.out.println("钱包剩余：" + money);
        }
    }

    public IPay startPay() {
        return new PayImpl();
    }

}
